﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

using Dapper;
using System.Data;
using System.Data.SqlClient;

namespace Web.Library
{
    public class BaseClass
    {
        private string connectionString;

        public BaseClass()
        { 
            
        }

        public IDbConnection GetConnection(string connection)
        {
            connectionString = string.IsNullOrEmpty(connection) ? System.Configuration.ConfigurationManager.ConnectionStrings["NorthwindConnection"].ConnectionString : connection;
            return new SqlConnection(connectionString);
        }

        
    }
}
